// ComPort.h: interface for the CComPort class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_COMPORT_H__10885553_56AA_11D3_B429_00A0C9327ABA__INCLUDED_)
#define AFX_COMPORT_H__10885553_56AA_11D3_B429_00A0C9327ABA__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CComPort  
{
public:
    enum tPort{COM1,COM2};
	CComPort();
    CComPort(tPort);
	virtual ~CComPort();
    void Open(tPort);
    void Open(CString p);
    void Close();
    char Read();
    void Write(char c);
    
    // members
protected:
    HANDLE m_hPort;
    CString m_szPort;   // the port that was opened

};

#endif // !defined(AFX_COMPORT_H__10885553_56AA_11D3_B429_00A0C9327ABA__INCLUDED_)
